<?php
/**
 * Created by PhpStorm.
 * User: Administrator
 * Date: 2018/2/8
 * Time: 17:54
 *  駿濤
 */

function render_status($status, $table)
{
    $str = '';
    switch ($status) {
        case 1:
            $str = '<a data-role="set_status"  data-status="1" class="layui-btn layui-btn-xs layui-btn-info">上线</a>';
            break;
        case 0:
            $str = '<a data-role="set_status" data-status="0" class="layui-btn layui-btn-xs layui-btn-danger">下线</a>';
            break;
    }
    return $str;
}